home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************************
-
- ASX Assembler Script for TurboText
-
- © 1993 by Michael "TILT!" Ryffel
- [some parts ripped from d.weber]
-
- ******************************************************************************
-
- this script could eventually check if asx is already running, and if not
- start it.. in this release arexx reports an error like "port not found.."
- to start asx you can use the popup function af the ttx/asx menu
-
- ******************************************************************************/
-
- OPTIONS RESULTS /* uups... */
-
-
- editorID='TTX' /* set editor id */
-
-
- GetPort /* get the rexx_port of the active */
- ttx_port=RESULT /* window, need it later */
-
-
- GetFilePath /* get the filepath to create */
- name=RESULT /* the id & the tempfile */
- SaveFileAs "Ram:TTX_ASM.S" /* save file to ram */
- SetFilePath name /* reset the filename */
-
-
- address command "delete >nil: ram:TTX_ASM.EXE" /* delete old EXECUTABLE */
-
-
- ADDRESS 'asx_rexx' /* address asx */
- FindID editorID':'name /* is this source already used */
- port = result /* get the port */
- DO WHILE port~='' /* address assembly job */
- ADDRESS (''||port) /* arexx weirdness... */
- EndOfAssembly /* kill job */
- ADDRESS 'asx_rexx' /* readdress asx */
- FindID editorID':'name /* is there another active job */
- port = result /* get the next port */
- END /* redo this stuff */
-
-
- BegOfAssembly /* begin a new job */
- port = result /* get its port */
-
-
- IF port~='' THEN DO /* did i get the new job? */
- ADDRESS (''||port) /* arexx weirdness */
- DefineID editorID':'name /* set an id (need this for ttx) */
- Assemble "ram:ttx_asm.s -oram:ttx_asm.EXE" /* assemble to tempfile */
-
- /* parse the assembler result */
-
- PARSE VALUE result WITH 1 'E:'err' W:'war'O:'opi'/'opb'C:'cod'S:'wor
-
-
- ADDRESS (''||ttx_port) /* address turbotext */
- SETSTATUSBAR (err" Errors "war" Warnings") /* write to windowtitlebar */
-
-
- /* do the funky stuff */
-
- call open 'console','con:40/50/600/200/ ...MESSAGE...FROM...ASX... /CLOSE/SCREENTURBOTEXT','W'
- call writeln 'console',('')
- call writeln 'console',(' File ['name'] assembled')
- call writeln 'console',('')
- call writeln 'console',(' 'cod' Bytes Objectfile')
- call writeln 'console',(' 'err' Errors')
- call writeln 'console',(' 'war' Warnings')
- call writeln 'console',(' 'opi' Optimizations saved 'opb' Bytes')
- call writeln 'console',(' 'wor' Bytes Workspace used')
- call writeln 'console',('')
- call writeln 'console',('')
- call writeln 'console',('')
- call writeln 'console',(' [Press Return or Close Window]')
- call readln 'console'
-
-
- END /* get out of this mess */
-